<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Keeper Demo Online chat room</title>
<!-- The script's src attribute set in the /WEB-INF/web.xml file. -->
<script type="text/javascript" src="./keeperScript.js"></script>
<!-- <script type="text/javascript" src="./ajaxReq.js"></script> -->

<script type="text/javascript" src="/ag/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript">

$(document).ready(function(){

	$("#sendBtn").click(function(){
		sendMsg();
	});
});
function sendMsg() {
	var msg = document.getElementById("sendMsg");
	if(msg){
		var d = "tid="+msg.value+'&ftid='+$("#eventId").val();
		$.ajax({
			type : "post",
			url : "/ag/servlet/NotifyObserver",
			data : d,
			dataType : "JSON",
			success : addSucc,
			error : function(textStatus) {
				alert("Ajax请求失败，请检查本地的网络连接！");
				return false;
			}
		});
		//sendReq('POST','./com/ag/lzw/action',d,startOrStop);
		msg.value = "";
	}
}

function addSucc(data){
	alert(data);
}

	
</script>
</head>
<body>
	<br/>
    <h2>This is Observeable</h2>
	<br/>
	<input type="text" id="sendMsg">
	<br/>
	<input id="sendBtn" type="button" value="Send" >
	<br/>
	<input type="text" id="eventId">
</body>
</html>